package br.com.future.action;

import java.util.List;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;

import br.com.future.bo.AdvogadoProcessoBO;
import br.com.future.model.Advogado;
import br.com.future.model.AdvogadoProcesso;
import br.com.future.model.Processo;
import com.opensymphony.xwork2.ActionSupport;

public class RelAdvogadoAction extends ActionSupport{
	
	private static final long serialVersionUID = 1L;
	
	private List<AdvogadoProcesso> listaAdvProc;
	private Advogado advogado;
	private Processo processo;

	
	@Action(value="consultaAdvProc",results={
			@Result(name="ok",location="/relatorioAdvogadoFinal.jsp")
	})
	public String consultaAdvProc(){
		AdvogadoProcessoBO negocio = new AdvogadoProcessoBO();
		listaAdvProc = negocio.consultaProcPorAdvogado(advogado.getNumOAB());
		return "ok";
	}
	

	public List<AdvogadoProcesso> getListaAdvProc() {
		return listaAdvProc;
	}

	public void setListaAdvProc(List<AdvogadoProcesso> listaAdvProc) {
		this.listaAdvProc = listaAdvProc;
	}
	
	public Advogado getAdvogado() {
		return advogado;
	}

	public void setAdvogado(Advogado advogado) {
		this.advogado = advogado;
	}
	public Processo getProcesso() {
		return processo;
	}

	public void setProcesso(Processo processo) {
		this.processo = processo;
	}
}
